<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>观点详情</title>
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<!--[if lt IE 9]>
      <script src="js/html5shiv.min.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
		<style type="text/css">

		</style>
	</head>

	<body>
		<!-- 头部导航 -->
		<header></header>
		<!--<nav class="navbar navbar-default" role="navigation">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navs">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
					<a class="navbar-brand" href="#"><img src="Web/切图（第五周交付）/splash-ic.png" width="55" height="55" alt="logo" id="logo_img" /></a>
				</div>
				<div class="collapse navbar-collapse" id="navs">
					<ul class="nav navbar-nav navbar-right">
						<li>
							<a href="index.html" target="_blank" class="nav_a"><span class="glyphicon li_active"><img src="Web/切图（第五周交付）/tabbar-news-f.png"/></span>热点</a>
						</li>
						<li class="active">
							<a href="viewpoint.html" target="_blank" class="nav_a"><span class="glyphicon li_active"><img src="Web/切图（第五周交付）/tabbar-paper-n.png"/></span>观点</a>
						</li>
						<li>
							<a href="data.html?country=CN,US,JP&indicator=NY.GDP.MKTP.CD" target="_blank" class="nav_a"><span class="glyphicon li_active"><img src="Web/切图（第五周交付）/tabbar-numbers-n.png"/></span>数据</a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle nav_a" data-toggle="dropdown"><span class="glyphicon"><img src="Web/切图（第五周交付）/n.png"/></span>我的 <span class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
								<li class="dropdown-header">登录</li>
								<li class="dl_style">
									<a href="javascript:void(0);" class="login_wechat">微信扫码</a>
								</li>
								<li class="dl_style">
									<a href="javascript:void(0);" class="login_phone">手机号</a>
								</li>
								<li>
									<a href="add_viewpoint.html" target="_blank">发布观点</a>
								</li>
								<li>
									<a href="my_viewpoint.html" target="_blank">历史观点</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</nav>-->
		<!-- 头部导航结束  -->

		<div id="wx_phone">
			<!-- 手机号登陆  -->
			<div id="phone">
				<div class="modal-dialog modal_style">
					<div class="modal-content">
						<div class="modal-body">
							<p class="modal_style_title">手机登录</p>
							<form role="form">
								<div class="form-group fg">
									<a class="btn btn-info btn-sm btn-block none" id="phone_error">手机格式不正确！重新输入</a>
									<input type="text" class="form-control" id="input_Phone" placeholder="请输入手机号">
									<!--<input type="password" class="form-control" id="input_password" placeholder="请输入密码">-->
									
									<input type="text" class="form-control form-group-sm " id="input_Phone_code" placeholder="请输入验证码">
									<a class="btn btn-info btn-sm btn-block none" id="code_btn1"><span id="code_num"><i>60</i>后可重新</span>获取验证码</a>
									<input type="button" class="btn btn-primary btn-sm btn-block " id="code_btn"  data-placement="bottom" value="获取验证码" />
								</div>
								<!--<input type="button" class="btn modal_style_btn btn_next fg" value="下一步">-->
								<input type="button" class="btn btn-success btn-block modal_style_btn btn_login phone_code_login" value="登录">
								<p id="wechat_tag">
									<!--<a href="javascript:void(0)" data-toggle="modal" data-target="#PhoneCode" class="phone_code">手机验证码登录<span class="glyphicon glyphicon-play"></span></a>-->
									<a href="javascript:void(0)" data-toggle="modal" data-target="#Phone" class="phone_no fg_hide">手机号登录<span class="glyphicon glyphicon-play"></span></a>
									<a href="javascript:void(0)" data-toggle="modal" data-target="#WeChat" id="aaa" class="">微信登录<span class="glyphicon glyphicon-play"></span></a>
								</p>
							</form>
						</div>
					</div>
				</div>
			</div>
			<!-- 微信登陆  -->
			<div id="WeChat">
				<div class="modal-dialog modal_style">
					<div class="modal-content">
						<div class="modal-body">
							<p class="modal_style_title">扫码登录</p>
							<form role="form">
								<div class="form-group" id="wx">
									<img src="images/erweima.png" alt="微信扫码" />
								</div>
								<p id="wechat_tag">
									<a href="javascript:void(0)" data-target="#Phone" class="">手机登录<span class="glyphicon glyphicon-play"></span></a>
								</p>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 观点详情 -->
		<div class="container" id="viewpoint_desc">
			<div class="media">
				<a class="media-left" href="#">
					<img src="" alt="...">
				</a>
				<div class="media-body">
					<h4 class="media-heading"></h4>
					<span></span>
				</div>
			</div>
			<!--<div class="col-sm-12 col-md-12 col-xs-12 viewpoint">
			<h2 class="viewpoint_title"><a href="#">股票期权鼓励制度法规政策研究</a></h2>
			<small>来源： <span class="source"> 经济日报  </span> <span class="source_time">&nbsp;  2015年7月1日</span></small>
            <div class="viewpoint_txt">
                <p>Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器
                </p>
                <p>Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。
                </p>
                <p>Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器
                </p>
                <p>
                	*经济日报
                </p>
            </div> 
		</div>-->
			<div class="col-sm-12 col-md-12 col-xs-12 viewpoint">
			</div>
			<!-- 评论区域 -->
			<div id="comment">
				<div id="comment_title">
					<span class="comment_img c_img1">
					<span class="badge pull-left num num1">42</span>
					</span>

					<span class="comment_img c_img2">
					<span class="badge pull-left num num2">102</span>
					</span>
					<div class="pull-right" style="line-height: 25px;">
						<span class="comment_img c_img1 comment_add_icon"></span>
						<a href="#" class="comment_add">添加评论</a>
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="comments">
					<div class="row">
						<div class="col-md-1">
							<a href="#">
								<img src="images/erweima.png" alt="头像" width="30" height="30" />
							</a>
						</div>
						<div class="col-md-11 comments_name">
							<span class="comments_author">吴敬琏</span>
							<span class="source_time">2015年7月1日</span>
						</div>
						<div class="col-md-11 comments_desc">
							<p>2015年7月1日复苏加快立法精神打击风口浪尖来了</p>
						</div>
					</div>
					<div class="row">
						<div class="col-md-1">
							<a href="#">
								<img src="images/erweima.png" alt="头像" width="30" height="30" />
							</a>
						</div>
						<div class="col-md-11 comments_name">
							<span class="comments_author">吴敬琏</span>
							<span class="source_time">2015年7月1日</span>
						</div>
						<div class="col-md-11 col-md-offset-1 comments_desc">
							<p>2015年7月1日复苏加快立法精神打击风口浪尖来了</p>
						</div>
					</div>
					<div class="row">
						<div class="col-md-1">
							<a href="#">
								<img src="images/erweima.png" alt="头像" width="30" height="30" />
							</a>
						</div>
						<div class="col-md-11 comments_name">
							<span class="comments_author">吴敬琏</span>
							<span class="source_time">2015年7月1日</span>
						</div>
						<div class="col-md-11 col-md-offset-1 comments_desc">
							<p>2015年7月1日复苏加快立法精神打击风口浪尖来了</p>
						</div>
					</div>
				</div>
			</div>
			<div class="comment_footer">
				<a class="next_comment" href="http://m.jjrb.grsx.cc/viewpoint_desc.html?id=">下一篇</a>
				<div class="c_f_style">
					<img src="images/erweima.png" width="20" height="20" />
					<span>吴敬琏</span>
				</div>
				<p class="c_f_style">股票期权理论及激励研究</p>
				<small style="color: #999999;">来源： <span class="source"> 经济日报  </span> <span class="source_time">&nbsp;  2015年7月1日</span></small>
			</div>
		</div>
		<footer></footer>
		<script src="js/jquery1.9.1.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script type="text/javascript" src="js/index.js"></script>
		<script type="text/javascript">
			$("header").load("header.html");
			$("footer").load("footer.html");
			$(function() {
				if (!localStorage.token) {
					alert("请登录后进行操作！");
					$("#phone").show();
					return false;
				}
				setTimeout(function(){
					console.log($("#navs li").length)
					$("#navs li").eq(1).addClass("active").siblings().removeClass("active");
				},500);
				//			alert(getUrlParams().id);
				//接口
				var _href = "http://api.jjrb.grsx.cc",
					interfacelist = {
						feed: "/feed",
					},
					u = getUrlParams(),
					urll = _href + interfacelist.feed + "/" + u.id;//"viewpoint.json";
				$.ajax({
					type: "get",
					url: urll, //,_href+interfacelist.feed,//
					async: true,
					data:{token:localStorage.token},
					success: function(data) {
						console.log(data);
//						var head = data.owner.head?data.owner.head:"";
						$("#viewpoint_desc .media-left img").attr("src", data.owner.head);
						$("#viewpoint_desc .media-heading").html(data.owner.name);
						$("#viewpoint_desc .media-body span").text(data.owner.sign);
						$("#aa").append(data.resources[0].descp);
						var otitle;
						if ($("#aa .otitle")) {
							otitle = $("#aa .otitle").text().substring(6)
						}else{
							otitle = data.resources[0].title;
						}
						
						var a = $("<div></div>");
						data.resources.forEach(function(res,inx){
							console.log(res);
							if (res.type==2) {
								console.log("图片");
								a.append('<p><img src="' + res.uri + '" /></p>');
							} else{
								a.append(res.descp);
							}
						});
						var htm = '<h2 class="viewpoint_title"><a href="#">' + otitle + '</a></h2>' +
							'<small>来源： <span class="source"> 经济日报  </span> <span class="source_time">&nbsp;  ' + timeF(data.created) + '</span></small>' +
							'<div class="viewpoint_txt">' + a[0].outerHTML + '<p>*经济日报</p></div> ';
						/*var html = '<div class="col-sm-12 col-md-12 col-xs-12 viewpoint">' +
									'<a href="viewpoint_desc.html?id=' + e.owner.id + '" target="_blank"><img class="header_img" src="' + e.owner.head + '" /></a>' +
									'<h2 class="viewpoint_title"><a href="viewpoint_desc.html?id=' + e.owner.id + '" target="_blank">' + otitle + '</a></h2>' +
									'<small>来源： <span class="source"> 经济日报  </span> <span class="source_time">&nbsp;  ' + timeF(e.created) + '</span></small>' +
									'      <div class="viewpoint_txt">'+ a[0].outerHTML +
									'</div> </div>';*/
						console.log(htm);
						
						
						
						$(".viewpoint").append(htm);
						$(".otitle").hide();
						$("#aa").html("");
					}
				});
				$(document).on("click",".next_comment",function(){
					var _id = parseInt(getUrlParams().id);
					var _href = $(".next_comment").attr("href");
					$(".next_comment").attr("href",_href + (_id+1));
				});
			});

			
		</script>
		<div id="aa" style="display: none;"></div>

	</body>

</html>